//
//  TSAuditTabBarController.m
//  chart
//
//  Created by 曾斌 on 16/3/26.
//  Copyright (c) 2016年 xu. All rights reserved.
//

#import "TSAuditTabBarController.h"
#import "TSUserViewController.h"
#import "TSSectionListViewController.h"
#import "TSTaskSearchViewController.h"
#import "TSReceiveFinishController.h"
#import "TSReceiveCommitController.h"
#import "TSAuditAlreadyController.h"
#import "TSAuditWaitController.h"
@implementation TSAuditTabBarController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    
    TSAuditAlreadyController *finishCol = [[TSAuditAlreadyController alloc] init];
   
    TSBaseNavigationController *nav_vc_finish = [[TSBaseNavigationController alloc] initWithRootViewController:finishCol];
    
    TSAuditWaitController *commit_vc = [[TSAuditWaitController alloc] init];

    TSBaseNavigationController *nav_vc_commit = [[TSBaseNavigationController alloc] initWithRootViewController:commit_vc];
    
    
    self.viewControllers = @[nav_vc_finish, nav_vc_commit];
    
    NSArray *tabBarTitle = @[@"已审核", @"待审核"];
    for (NSUInteger i = 0; i < self.viewControllers.count; i++) {
        UIViewController *viewController = [self.viewControllers objectAtIndex:i];
        if ([viewController isMemberOfClass:[UINavigationController class]]) {
            viewController = [[(UINavigationController *)viewController viewControllers] firstObject];
        }
        
        if (i == 0) {
            viewController.tabBarItem = [self tabBarItemWithImage:[NSString stringWithFormat:@"nav_nor_%zd", 3] SelectedImgName:[NSString stringWithFormat:@"nav_hlr_%zd", 3]];
        }
        else{
            viewController.tabBarItem = [self tabBarItemWithImage:[NSString stringWithFormat:@"nav_nor_%zd", i] SelectedImgName:[NSString stringWithFormat:@"nav_hlr_%zd", i]];
        }
        
        viewController.tabBarItem.tag = i;
        viewController.tabBarItem.title = tabBarTitle[i];
    }
}


@end
